package com.xingda.packing.shunt.listener;



import com.xingda.packing.domain.ShuntProductionLine;
import com.xingda.packing.enums.TaskState;
import com.xingda.packing.enums.TaskType;
import com.xingda.packing.task.ticket.AbstractTaskTicket;

public interface TaskListenerService {
    boolean accept(ShuntProductionLine productionLine, int area);

    void monitor(ShuntProductionLine productionLine, int area);

    default boolean checkTask(AbstractTaskTicket ticket, TaskType taskType) {
        return ticket != null && ticket.getType() == taskType && ticket.getState() == TaskState.RUNING;
    }
}
